function fn(nums) {
    function diff(a, b) {
        let aArr = a.split(".").map(e => Number(e))
        let bArr = b.split('.').map(e => Number(e))
        let n = Math.max(aArr.length, bArr.length)
        for (let i = 0; i < n; i++) {
            if (aArr[i] > bArr[i]) {
                return 1
            }
            if (aArr[i] < bArr[i]) {
               return  -1
            }
            return 0
        }

    }
  return   nums.sort(diff)
    
}
console.log(fn(['1.5.1', '1.45.0', '1.5', '6', '3.3.3.3.3.3.3', "1.99.0", "1.98.0", "34.3.2", "132.0.6834.210", "1.9.0"]));
